package com.eazykitchen.service;

import com.eazykitchen.entity.Paginating;
import com.eazykitchen.entity.UserInformation;
import org.apache.ibatis.annotations.Param;

public interface UserService {

    /**
     * 根据用户名查找用户的信息
     * @param userName
     * @return
     * @throws Exception
     */
    public UserInformation getUserByName(String userName)throws Exception;

    /**
     *
     * @param userId
     * @return
     * @throws Exception
     */
    public UserInformation getUserById(int userId)throws Exception;

    /**
     * 新增用户
     * @param userInformation
     * @return
     * @throws Exception
     */
    public int addUser(UserInformation userInformation)throws Exception;

    /**
     * 判断新增用户是否重名
     * @param userName
     * @return
     * @throws Exception
     */
    public boolean isUserName(String userName)throws Exception;

    /**
     * 删除用户
     * @param userId
     * @return
     * @throws Exception
     */
    public int delUser(int userId)throws Exception;

    /**
     * 更新用户信息
     * @param userInformation
     * @return
     * @throws Exception
     */
    public int updateUser(UserInformation userInformation)throws Exception;

    /**
     *
     * @param userInformation
     * @return
     * @throws Exception
     */
    public Paginating<UserInformation> getUserList(UserInformation userInformation)throws Exception;


}
